There is related art in which pieces of stream data, which each include a piece of reception data representing a set of a key and a numerical value within each of a plurality of windows (periods) delimited by certain intervals between a start time and an end time, are received from a plurality of shops and the pieces of stream data are combined.
The above-described related art will be described. Here, description will be given of the case of combining windows of stream data R and stream data S that are received from two different shops and obtaining data on a customer who made purchases in both shops over a certain period of time as well as the total cost of the purchases.
FIG. 30 illustrates related art. The stream data R includes windows R1, R2, R3, and R4. The stream data S includes windows S1, S2, S3, and S4. Each of the windows includes one or more pieces of reception data in which the name of a customer and the cost of a product that the customer purchased are associated with each other. For window conditions, both of the stream data R and the stream data S have a window width of 30 minutes and a start time of 10:00.
In the related art, the result obtained by combining windows that have been closed most recently of the stream data R and the stream data S is the current result set. For example, when the current time falls in the time range “10:30 to 11:00”, the windows that have been closed most recently are window R1 and window S1. In a comparison of window R1 and window S1, a customer included in both of the stream data R and the stream data S is “Alice” and the total cost for “Alice” is 900. Hence, the result set for R1×S1 is “Alice, 900”.
When the current time falls in the time range “11:00 to 11:30”, windows that have been closed most recently are window R2 and window S2. In a comparison of window R2 and window S2, customers included in both the stream data R and the stream data S are “Henry” and “Caren”. The total cost for “Henry” is “1600” and the total cost for “Caren” is “300”. Hence, the result set for R2×S2 includes “Henry, 1600” and “Caren, 300”.
When the current time falls in the time range “11:30 to 12:00”, windows which have been closed most recently are the window R3 and the window S3. In a comparison of the window R3 and the window S3, a customer included in both the stream data R and the stream data S is “Dick” and the total cost for “Dick” is “700”. Hence, the result set of R3×S3 is “Dick, 700”.
Examples of related art include Japanese Laid-open Patent Publication No. 2010-238195 and A. Arasu et al. “The CQL continuous query language: semantic foundations and query execution”, VLDB Journal, 15(2), pp. 121-142, 2006.